var seeSvc = require("../../services/seeSvc");
//乐看首页
exports.index = function (req, res) {
    res.render("see/index");
};
//媒体首页
exports.mediaHome = function (req, res) {
    res.render("see/mediaHome");
};
//乐看首页轮播
exports.getCarouselList = function (req, res) {
    seeSvc.getCarouselList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页分类
exports.getCategoryList = function (req, res) {
    seeSvc.getCategoryList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页推荐广告列表
exports.getRecommendList = function (req, res) {
    seeSvc.getRecommendList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页企业广告列表
exports.getEnterpriseList = function (req, res) {
    seeSvc.getEnterpriseList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页自媒体广告列表
exports.getMediaList = function (req, res) {
    seeSvc.getMediaList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页城市列表
exports.getCityList = function (req, res) {
    seeSvc.getCityList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页城市广告列表
exports.getCityAdvList = function (req, res) {
    seeSvc.getCityAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页传统广告列表
exports.getTraditionList = function (req, res) {
    seeSvc.getTraditionList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页人气分页列表
exports.getHotAdvList = function (req, res) {
    seeSvc.getHotAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页静态广告列表
exports.getStaticList = function (req, res) {
    seeSvc.getStaticList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id获取企业信息
exports.getUserInfo = function (req, res) {
    seeSvc.getUserInfo(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 关注
exports.getFollowAdd = function (req, res) {
    seeSvc.getFollowAdd(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 关注id 取消关注
exports.getFollowDelete = function (req, res) {
    seeSvc.getFollowDelete(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 获取视频列表
exports.getUserAdvList = function (req, res) {
    seeSvc.getUserAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 获取相册列表
exports.getAllAlbumByUserId = function (req, res) {
    seeSvc.getAllAlbumByUserId(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 获取产品列表
exports.getAllProductByUserId = function (req, res) {
    seeSvc.getAllProductByUserId(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//广告视频
exports.adVideo = function (req, res) {
    res.render("see/adVideo");
};
//获取播放视频信息
exports.getAdvById = function (req, res) {
    seeSvc.getAdvById(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过视频id获取相关推荐信息
exports.getAdvRecommendByAdvId = function (req, res) {
    seeSvc.getAdvRecommendByAdvId(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体
exports.selfMedia = function (req, res) {
    res.render("see/selfMedia");
};